{extend name="extra@admin/content"}
{block name="content"}
<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">优惠券名字</label>
        <div class="layui-input-block">
            <input name="name" value='{$coup.name}' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">图片:</label>
        <div class="layui-input-block">
           <img src="{$coup.img}" width="60px;" height="60px;">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block" >
          <input type="radio" name="type" disabled="disabled" value="1" lay-filter="test" {if condition="$coup.type eq 1"} checked {/if} title="通用优惠券">
          <input type="radio" name="type" disabled="disabled" value="0" lay-filter="test" {if condition="$coup.type eq 0"} checked {/if} title="商品优惠券">
        </div>
    </div>
    {if condition="$coup.goods_id neq 0"}
    <div class="layui-form-item" id="goods_id">
        <label class="layui-form-label">商品</label>
        <div class="layui-input-block">
            <input name="goods_id" value='{$goods}' required="required" 
                   title="商品" class="layui-input" readonly="readonly">
        </div>
    </div>
    {/if}
    {if condition="empty($coup.condition)"}
    <div class="layui-form-item">
        <label class="layui-form-label">满减条件</label>
        <div class="layui-input-block">
         <input name="name" value='{$coup.condition}' required="required" 
                   title="满减条件，例如：满300减30" class="layui-input" readonly="readonly">
        </div>
    </div>
    {/if}
    {if condition="empty($coup.money)"}
    <div class="layui-form-item">
        <label class="layui-form-label">优惠金额</label>
        <div class="layui-input-block">
           <input name="name" value='{$coup.money}' required="required" 
                   title="优惠金额" class="layui-input" readonly="readonly">
        </div>
    </div>
    {/if}
    {if condition="!empty($coup.discount)"}
    <div class="layui-form-item">
        <label class="layui-form-label">折扣</label>
        <div class="layui-input-block">
            <input name="discount" value='{$coup.discount}' required="required" 
                   title="输入0~100的数字" class="layui-input" readonly="readonly">
        </div>
    </div>
    {/if}
     <div class="layui-form-item">
        <label class="layui-form-label">发放数量</label>
        <div class="layui-input-block">
          <input name="name" value='{$coup.createnum}' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">       
        </div>
    </div>
     <!-- <div class="layui-form-item">
        <label class="layui-form-label">发放类型:</label>
        <div class="layui-input-block">
          {if($coup.send_type==0)}
            <input name="name" value='无数量限制按时间发放' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">
          {else}
              <input name="name" value='按量按时间发放领完为止' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">
          {/if}
        </div>
    </div> -->
    <div class="layui-form-item">
        <label class="layui-form-label">发放时间:</label>
        <div class="layui-input-block">
            <input name="name" value='{$coup.send_start_time|date="Y-m-d",###}' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">结束时间:</label>
        <div class="layui-input-block">
          <input name="name" value='{$coup.send_end_time|date="Y-m-d",###}' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">使用开始时间:</label>
        <div class="layui-input-block">
        <input name="name" value='{$coup.use_start_time|date="Y-m-d",###}' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">使用结束时间:</label>
        <div class="layui-input-block">
        <input name="name" value='{$coup.use_end_time|date="Y-m-d",###}' required="required" 
                   title="优惠券名字" class="layui-input" readonly="readonly">
        </div>
    </div>
        
     <!-- <div class="layui-form-item">
        <label class="layui-form-label">是否可用:</label>
        <div class="layui-input-block">
           <input type="radio" name="status" value="1"  title="有效" {if condition="$coup.status eq 1"} checked {/if} disabled>
            <input type="radio" name="status" value="0"  title="无效" {if condition="$coup.status eq 0"} checked {/if} disabled>
        </div>
    </div> -->
      
    
    <div class="hr-line-dashed"></div>
    <!-- <div class="layui-form-item text-center">
        <input type="hidden" name="id" value="{$coup.id}">
            {if($coup.status==1)}
              <button class="layui-btn" type='submit'>设为无效</button>
            {else}
               
            {/if}
        
        <button class="layui-btn layui-btn-danger" type='button'  data-close>关闭</button>
    </div> -->

    <script type="text/javascript">

    </script>

    <script>window.form.render();</script>
    
</form>
<style type="text/css">  
.ibox-content{
    overflow-y: scroll;
    overflow-x: hidden;
    height: 500px;
}
</style>

{/block}

